home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / dvivga9.zip / OUTROW.H < prev    next >
Text File  |  1988-05-30  |  1KB  |  28 lines

  1. /* -*-C-*- outrow.h */
  2. /*-->outrow*/
  3. /**********************************************************************/
  4. /******************************* outrow *******************************/
  5. /**********************************************************************/
  6.  
  7. void
  8. outrow(c,yoff)    /* copy img_row[] into rasters[] if allocated, else no-op */
  9. BYTE c;        /* current character value */
  10. UNSIGN16 yoff;    /* offset from top row (0,1,...,hp-1) */
  11. {
  12.     register UNSIGN16 k;    /* loop index */
  13.     register UNSIGN32 *p;    /* pointer into img_row[] */
  14.     register UNSIGN32 *q;    /* pointer into rasters[] */
  15.     register struct char_entry *tcharptr; /* temporary char_entry pointer */
  16.     UNSIGN16 words_per_row;    /* number of raster words to copy */
  17.  
  18.     tcharptr = &(fontptr->ch[c]);
  19.     if (tcharptr->rasters != (UNSIGN32*)NULL)
  20.     {
  21.     words_per_row = (UNSIGN16)(tcharptr->wp + 31) >> 5;
  22.     p = tcharptr->rasters + yoff*words_per_row;
  23.     q = img_row;
  24.     for (k = words_per_row; k; --k)    /* copy img_row[] into rasters[] */
  25.         *p++ = *q++;
  26.     }
  27. }
  28.